package model

import "gorm.io/gorm"

type Orders struct {
	gorm.Model
	UserId   int    `gorm:"type:int;index;not null;comment:'用户Id'"`
	MemberId int    `gorm:"type:int;index;not null;comment:'会员Id'"`
	OrderSn  string `gorm:"type:char(36);unique;not null;comment:'订单号'"`
	Price    int    `gorm:"type:int;not null;comment:'价格'"`

	Status int `gorm:"type:int;default:0;not null;comment:'状态:1-待支付 2-已支付 3-已退款 4-已完成'"`
}

func (o *Orders) TableName() string {
	return "orders"
}
